function xOut=erf(xIn)
  x = xIn.v;
  xOut.v=erf(x);
  d = (2/sqrt(pi))*exp(-x.^2);
  xOut.d = elelmult_firstindx(d,xIn.d);

  xOut=class(xOut,'der1');
